package edu.npu.cv.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName UserDO
 * @Description TODO
 * @Author Quentin_zyj
 * @Date 2021/10/5 18:11
 */
@Data
@TableName("tb_user")
public class UserDO {


    @TableId
    private long id;

    private String nickName;

    private String account;

    private String password;

    private String email;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("UserDO{");
        sb.append("id=").append(id);
        sb.append(", nickName='").append(nickName).append('\'');
        sb.append(", account='").append(account).append('\'');
        sb.append(", password='").append(password).append('\'');
        sb.append(", email='").append(email).append('\'');
        sb.append(", createTime=").append(createTime);
        sb.append(", modifyTime=").append(modifyTime);
        sb.append('}');
        return sb.toString();
    }
}
